<?php
/* @var $this SaleController */
/* @var $model Sale */

$this->breadcrumbs=array(
	'报表分析'=>array('property'),
	'人群属性分析',
);
//设置页面标题
$this->pageTitle=Yii::app()->name.' - 人群属性分析';
$this->contentTitle='人群属性分析';
?>
<!-- 查询表单 -->
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
<!-- 查询表单 -->

<!-- 数据表格 -->
<table cellspacing="1" class="mylist2">
		<tr class="mylist_title">
                    <td>时间</td>
                    <?php foreach ($crowd as $key => $value) {?>
                    <td><?php echo CHtml::encode($value->title);?></td>
                    <?php }?>   
		</tr>
	<tbody>
		<?php foreach ($queryData_1 as $key => $value) {?>
		<tr class="datalist">
                    <?php foreach ($value as $key => $z) {?>
                       <td><?php echo CHtml::encode($z);?></td>
                       <?php }?>
		</tr>
		<?php }?>
	</tbody>
</table>
<!-- 数据表格 -->

<!-- 数据分页 -->
<div class="mylist_foot">
    <div class="fl p10 btn"><a href="javascript:propertyExport(0);">EXCEL导出</a></div>
</div>
	<div class="pagecss fr">
	<?php $this->widget("CLinkPager", array(
        "pages" => $data->pagination,
        "header"=>"跳转到：",
        "prevPageLabel"=>"&lt; 上一页",
        "nextPageLabel"=>"&gt; 下一页",
        "firstPageLabel"=>"&lt;&lt; 首页",
        "lastPageLabel"=>"&gt;&gt; 尾页",
        "maxButtonCount"=>5,
        "footer"=>"当前页数：".($data->pagination->currentPage+1)." 总页数：".$data->pagination->pageCount." 总记录数：".$data->pagination->itemCount
    )) ?>
	</div>
</div>

<?php if(Yii::app()->user->hasFlash('success'))
        echo "<script> art.dialog({
        id: 'dialogTest',
        title: '提示信息',
        time: 5,
        icon: 'succeed',
        content: '<b>操作成功！</b><br /><br />该消息5秒后自动消失！',
        button: [
            {
                name: '确定',
                focus: true
            }]
    });</script>" 

?><!-- 数据分页 -->
<!-- 脚本 -->
<script type="text/javascript">
    function deleteSelect(id){
        ajaxSubmitdeleteSelect(id,'<?php echo Yii::app()->createUrl('sale/delete',array('id'=>0)) ?>
');
    }
    
    function propertyExport(){
        var from=$("#Party_add_time").val();
        var to=$("#Party_update_time").val();
        window.location.href="<?php echo Yii::app()->baseUrl?>/index.php/report/exportProperty?Party[add_time]="+from+"&Party[update_time]="+to;
}      
</script>
<!-- 脚本 -->
